package com.ruicar.afs.cloud.risk.api.dto.tortoise;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseAntiFraudCallStep;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseScene;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description 玄武结果通知
 * @Author Peng Jinbo
 * @Date 2020/07/30 20:19
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class TortoiseResultNotice<T> implements Serializable {

    /**
     * Main id
     */
    private String mainId;

    /**
     * Apply no
     */
    private String applyNo;

    /**
     * Serial number
     */
    private String serialNumber;

    /**
     * Scene
     */
    @JSONField(serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseScene scene;

    /**
     * Call step
     */
    @JSONField(serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseAntiFraudCallStep callStep;

    /**
     * Notice date
     */
    @JSONField(name = "noticeDate",format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date noticeDate;

    /**
     * Notice info
     */
    private T noticeInfo;

    /**
     * Err code
     */
    private boolean err;

    /**
     * Err msg
     */
    private String errMsg;


}
